#include"HuffTree.h"
int main() {

	int weight[] = {1,2,3,4};
	int arrLength = sizeof(weight) / sizeof(int);
	HuffTree* tree = init(weight, arrLength);
	int* minBi = selectMin(tree);
	printf("[%d,%d]\n", minBi[0], minBi[1]);
	createHFTreee(tree);
	for (int i = 0; i < tree->useSize; i++) {
		printf("%d ",tree->a[i].weight);
	}
	printf("\n");
	preOrder(tree,tree->useSize-1);

	return 0;
}